package com.boang.handler;

import com.alibaba.csp.sentinel.slots.block.flow.FlowException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/*
  @author: 13813
  @date: 2024/8/29 11:07
*/
//@ControllerAdvice
@RestControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler(FlowException.class)
//    @ResponseBody
    public String st02Handler(Throwable throwable) {
        return "系统繁忙，稍后再试";
    }
}
